package com.kestrel.space.core.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Author: kestrel
 * @Version:1.0
 * @Date: 2024/8/21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "space_file")
public class MyFile  {
    /**
     * 文件编号
     */
    @Id
    private Long id;
    /**
     * 文件名字
     */
    private String fileName;
    /**
     * 文件类型
     */
    private String fileType;
    /**
     * 是否逻辑删除
     */
    private boolean ifDeleted;
    /**
     * 0 - 文件
     * 1 - 文件夹
     * 2 - 博客(docx)
     * 3 - 博客(pdf)
     */
    private int mark;
    /**
     * 腾讯云文件连接
     */
    private String fileCosUrl;
    /**
     *  文件系统位置
     */
    private String fileOsUrl;
    /**
     * 文件创建时间
     */
    private Date createTime;
    /**
     * 文件修改时间
     */
    private Date updateTime;
    /**
     * md5
     */
    private String md5;

    public MyFile(String fileName, String fileType, boolean ifDeleted, int mark, String fileCosUrl, String fileOsUrl, Date createTime, Date updateTime) {
        this.fileName = fileName;
        this.fileType = fileType;
        this.ifDeleted = ifDeleted;
        this.mark = mark;
        this.fileCosUrl = fileCosUrl;
        this.fileOsUrl = fileOsUrl;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}
